package com.bangbangu.account.dao.impl;

import org.hibernate.Session;
import org.hibernate.SessionFactory;

import com.bangbangu.account.dao.RegisterDao;
import com.bangbangu.account.model.Account;

public class RegisterDaoImpl implements RegisterDao {

	private SessionFactory sessionFactory;
	
	@Override
	public void register(Account account) {
		Session session = sessionFactory.openSession();
		session.beginTransaction();
		session.save(account);
		session.getTransaction().commit();
	}

	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}

	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}
	
	
	
}
